import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PassportModule } from '@nestjs/passport';
import { HttpModule } from '@nestjs/axios';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import User from 'src/entities/user.entity';
import Student from 'src/entities/student.entity';
import Admin from 'src/entities/admin/admin.entity';
import { AuthStorage } from './auth.strategy';

@Module({
  imports: [
    TypeOrmModule.forFeature([User, Student, Admin]),
    HttpModule.register({
      timeout: 5000,
      maxRedirects: 5,
    }),
    PassportModule,
  ],
  controllers: [AuthController],
  providers: [AuthService, AuthStorage],
})
export class AuthModule {}
